#ifndef OPBLOCK
#define OPBLOCK

#include "VMPFocus.hpp"
#include "operations.hpp"
#include "hlp blank.hpp"

//Property text:
cText TEXT_BLOCK="{}";
cText TEXT_BLOCKTEXT="block";


void funOpBPreL(ListIdentity* what){
	for(int i=0; i<what->length(); ++i)
		(*what)[i]->Identifier=&TEXT_ELEMENT;
	ParserRename(what,"blank",TEXT_BLANK);
};

sRecord funOpBEva(ptrRETNode retnode, ptrParsedElement pe, void* nothing){
	for (int i=0; i<pe->SubElements.length(); ++i)
		eval(retnode,pe->SubElements[i],nothing);
	return sRecord();
}

ptrOperation loadOpB(){
	ptrOperation tmp=new cOperation();
	tmp->Formula="\\{:blank:?(:element::blank:?;:blank:?)*:blank:?\\}";
	tmp->onPostLining=NULL;
	tmp->onPreLining=funOpBPreL;
	tmp->onMakingTree=NULL;
	tmp->Name=TEXT_BLOCK;
	tmp->onEvaluate=funOpBEva;
	return tmp;
}

#endif